using System;
using System.Collections.Generic;
using System.Text;
using Shc.Sql;
using Shc.Json;
namespace CLZ.Data
{
	public static class TableViewHomeProduct
	{
		public const string Table = "View_HomeProduct";
		public const string HomeProductId = "HomeProductId";
		public const string VegetablesID = "VegetablesID";
		public const string BusinessID = "BusinessID";
		public const string HomeProductType = "HomeProductType";
		public const string NowOriginalPrice = "NowOriginalPrice";
		public const string NowSalesGuidePrice = "NowSalesGuidePrice";
		public const string SetDate = "SetDate";
		public const string HomeProductTypeName = "HomeProductTypeName";
		public const string BusinessName = "BusinessName";
		public const string BusinessNo = "BusinessNo";
		public const string VegetablesName = "VegetablesName";
		public const string ImageUrl = "ImageUrl";
		public const string NumberOfUnitsName = "NumberOfUnitsName";
	}
	
	[Serializable]
	public class BaseViewHomeProduct
		: IDbSessionEntity, IJsonClass
	{
		int m_HomeProductId;
		/// <summary>
        /// 
        /// </summary>
        public int HomeProductId
        {
            get { return m_HomeProductId; }
            set { m_HomeProductId = value; }
        }
		
		int? m_VegetablesID;
		/// <summary>
        /// 
        /// </summary>
        public int? VegetablesID
        {
            get { return m_VegetablesID; }
            set { m_VegetablesID = value; }
        }
		
		int? m_BusinessID;
		/// <summary>
        /// 
        /// </summary>
        public int? BusinessID
        {
            get { return m_BusinessID; }
            set { m_BusinessID = value; }
        }
		
		int? m_HomeProductType;
		/// <summary>
        /// 
        /// </summary>
        public int? HomeProductType
        {
            get { return m_HomeProductType; }
            set { m_HomeProductType = value; }
        }
		
		double m_NowOriginalPrice;
		/// <summary>
        /// 
        /// </summary>
        public double NowOriginalPrice
        {
            get { return m_NowOriginalPrice; }
            set { m_NowOriginalPrice = value; }
        }
		
		double m_NowSalesGuidePrice;
		/// <summary>
        /// 
        /// </summary>
        public double NowSalesGuidePrice
        {
            get { return m_NowSalesGuidePrice; }
            set { m_NowSalesGuidePrice = value; }
        }
		
		DateTime m_SetDate;
		/// <summary>
        /// 
        /// </summary>
        public DateTime SetDate
        {
            get { return m_SetDate; }
            set { m_SetDate = value; }
        }
		
		string m_HomeProductTypeName;
		/// <summary>
        /// 
        /// </summary>
        public string HomeProductTypeName
        {
            get { return m_HomeProductTypeName; }
            set { m_HomeProductTypeName = value; }
        }
		
		string m_BusinessName;
		/// <summary>
        /// 
        /// </summary>
        public string BusinessName
        {
            get { return m_BusinessName; }
            set { m_BusinessName = value; }
        }
		
		string m_BusinessNo;
		/// <summary>
        /// 
        /// </summary>
        public string BusinessNo
        {
            get { return m_BusinessNo; }
            set { m_BusinessNo = value; }
        }
		
		string m_VegetablesName;
		/// <summary>
        /// 
        /// </summary>
        public string VegetablesName
        {
            get { return m_VegetablesName; }
            set { m_VegetablesName = value; }
        }
		
		string m_ImageUrl;
		/// <summary>
        /// 
        /// </summary>
        public string ImageUrl
        {
            get { return m_ImageUrl; }
            set { m_ImageUrl = value; }
        }
		
		string m_NumberOfUnitsName;
		/// <summary>
        /// 
        /// </summary>
        public string NumberOfUnitsName
        {
            get { return m_NumberOfUnitsName; }
            set { m_NumberOfUnitsName = value; }
        }
		
		
		#region IDbSessionEntity Members
		public void ReadDBData(RowDataReader reader)
        {
            m_HomeProductId = reader[TableViewHomeProduct.HomeProductId];
            m_VegetablesID = reader[TableViewHomeProduct.VegetablesID];
            m_BusinessID = reader[TableViewHomeProduct.BusinessID];
            m_HomeProductType = reader[TableViewHomeProduct.HomeProductType];
            m_NowOriginalPrice = reader[TableViewHomeProduct.NowOriginalPrice];
            m_NowSalesGuidePrice = reader[TableViewHomeProduct.NowSalesGuidePrice];
            m_SetDate = reader[TableViewHomeProduct.SetDate];
            m_HomeProductTypeName = reader[TableViewHomeProduct.HomeProductTypeName];
            m_BusinessName = reader[TableViewHomeProduct.BusinessName];
            m_BusinessNo = reader[TableViewHomeProduct.BusinessNo];
            m_VegetablesName = reader[TableViewHomeProduct.VegetablesName];
            m_ImageUrl = reader[TableViewHomeProduct.ImageUrl];
            m_NumberOfUnitsName = reader[TableViewHomeProduct.NumberOfUnitsName];
        }
		
		public void WriteDBData(RowDataWriter writer)
        {
        }

        public void SetIdentityAfterInsert(DBObject idd)
        {
        }
		
		public string TableName
        {
            get { return TableViewHomeProduct.Table; }
        }
		#endregion
		
		
		#region IJsonClass Members

        public void JsonDeSerializeObj(JsonHashTable hashToRead)
        {
             m_HomeProductId = hashToRead["HomeProductId"];
			 
             m_VegetablesID = hashToRead["VegetablesID"];
			 
             m_BusinessID = hashToRead["BusinessID"];
			 
             m_HomeProductType = hashToRead["HomeProductType"];
			 
             m_NowOriginalPrice = hashToRead["NowOriginalPrice"];
			 
             m_NowSalesGuidePrice = hashToRead["NowSalesGuidePrice"];
			 
             m_SetDate = hashToRead["SetDate"];
			 
             m_HomeProductTypeName = hashToRead["HomeProductTypeName"];
			 
             m_BusinessName = hashToRead["BusinessName"];
			 
             m_BusinessNo = hashToRead["BusinessNo"];
			 
             m_VegetablesName = hashToRead["VegetablesName"];
			 
             m_ImageUrl = hashToRead["ImageUrl"];
			 
             m_NumberOfUnitsName = hashToRead["NumberOfUnitsName"];
			 
        }

        public void JsonSerializeObj(JsonHashTable hashToFill)
        {
            hashToFill["HomeProductId"] = HomeProductId;
			
            hashToFill["VegetablesID"] = VegetablesID;
			
            hashToFill["BusinessID"] = BusinessID;
			
            hashToFill["HomeProductType"] = HomeProductType;
			
            hashToFill["NowOriginalPrice"] = NowOriginalPrice;
			
            hashToFill["NowSalesGuidePrice"] = NowSalesGuidePrice;
			
            hashToFill["SetDate"] = SetDate;
			
            hashToFill["HomeProductTypeName"] = HomeProductTypeName;
			
            hashToFill["BusinessName"] = BusinessName;
			
            hashToFill["BusinessNo"] = BusinessNo;
			
            hashToFill["VegetablesName"] = VegetablesName;
			
            hashToFill["ImageUrl"] = ImageUrl;
			
            hashToFill["NumberOfUnitsName"] = NumberOfUnitsName;
			
        }

        #endregion
		
	}
}
